package com.lanou.web.controller;

import com.lanou.service.ItemDescService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * Created by QuChao on 2018/11/9
 */
@Controller
public class ItemDescController {
    @Autowired
    private ItemDescService itemDescService;

    @ResponseBody
    @RequestMapping("/rest/item/query/item/desc/{id}")
    public Map<String, Object> showDesc(@PathVariable("id") Long id) {
        return itemDescService.findByItemId(id);
    }
}
